package com.xs.common.bean;


/**
 * @author xs
 * date 2018-12-15 15:32
 */
public enum SexEnum implements IEnum {

    male(1, "男"),
    female(2, "女");


    private Integer type;
    private String sex;


    SexEnum(Integer type, String sex) {
        this.type = type;
        this.sex = sex;
    }

    public Integer getType() {
        return type;
    }

    public String getSex() {
        return sex;
    }

    @Override
    public String getDesc(Object type) {
        for (SexEnum sexEnum : values()) {
            if(sexEnum.type.equals(type)){
                return sexEnum.getSex();
            }
        }
        return "";
    }
}
